﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Auto.Data.BusMan.BLL
{
    public  class ClearBMData
    {

        public bool ClearData()
        {
            string str = @"TRUNCATE TABLE Bus_BusAccident
                            TRUNCATE TABLE Bus_BusAccidentProcess
                            TRUNCATE TABLE Bus_BusApply
                            TRUNCATE TABLE Bus_BusBreakRules
                            TRUNCATE TABLE Bus_BusDailyChecking
                            TRUNCATE TABLE Bus_BusInsurance
                            TRUNCATE TABLE Bus_BusList
                            TRUNCATE TABLE Bus_BusMaintenance
                            TRUNCATE TABLE Bus_BusOilManage
                            TRUNCATE TABLE Bus_BusRelatedInfoRecheckHistory
                            TRUNCATE TABLE Bus_BusTransfer
                            TRUNCATE TABLE Bus_BusTyreManage
                            TRUNCATE TABLE Bus_BuyOilManage
                            TRUNCATE TABLE Bus_DriverBuses
                            TRUNCATE TABLE Bus_Drivers
                            TRUNCATE TABLE Bus_ManagementPolicy
                            TRUNCATE TABLE Bus_SecruityAnalysisMeeting
                            TRUNCATE TABLE Bus_SecurityTraining
                            DELETE FROM [_SysPhraseDetail]
                            ";
            try
            {
                DBUtility.DbHelper.ExecuteNonQuery(str);
                return true;
            }
            catch(Exception ex)
            {
                throw ex;
            }

        }
    }
}
